<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="./jquery-3.7.1.min.js"></script>
    <style>
        .box{
            width:200px;
            height:200px;
            background-color:lightblue;
            position:relative;
            left:100px;
            top:50px;
        }

        .root{
            width:200px;
            height:200px;
            background-color:lightcoral;

        }
    </style>
</head>
<body>
    <div class="box"></div>
    <div class="root"></div>

    <script>
        //获取元素相对文档的位置
        var offset = $('.box').offset()
        console.log(offset)

        $('.root').offset({
            top:offset.top+200,
            left:offset.left
        })


    </script>
</body>
</html>